﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Web.Caching;
using ZLDC.Common.Estate;
using System.Text;


namespace ZLDC.Estate
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            

            //string sql = "select a.id,a.did,a.dname,a.aid,a.area,a.buildname,a.buildid,a.roomno,a.roomid,a.tradetype,a.room,a.hall,";
            //sql += "a.restroom,a.balcony,a.acreage,a.totalprice,a.leaseprice,a.unitprice,a.[owner],a.ownertel,a.remark,a.fitment,a.[use],a.markuid,";
            //sql += " a.markuser,a.markUDeptId,a.markudept,a.uddate,a.markdate,a.mark1,a.haskey,a.isonly,a.hasphoto,a.ctycont,a.protected,";
            //sql += " a.recommend,a.keepKey,a.keyno,a.keepkeydate,a.[status],a.status1,a.isvalid,a.ename,a.eid,a.tenant,a.assignmentfee from ( ";
            //sql += " select top  50  b.udDate,b.Id from(";
            //sql += " select top 50 b.udDate,b.Id  from";
            //sql += "  t_housing  b  where dltFlag=0 and isvalid < 2 and (status = 1 or (status1 > 1 and status = 2))  and [use] in(1,4) and did=2 and tradeType=1 order by b.udDate desc,b.Id desc) b ";
            //sql += " order by  b.udDate asc,b.Id asc) b inner join t_housing  a on a.Id = b.Id";
            //sql += " order by b.udDate desc,b.Id desc";

            //DataTable dt = null; 
            //using (ZLDC.Common.Estate._Database db = new ZLDC.Common.Estate._Database("estate"))
            //{
            //    DataSet ds = db.Query(sql);
            //    dt = ds.Tables[0];
            //}

            //GridView1.DataSource = dt;
            //GridView1.DataBind();


            //System.Web.Caching.Cache _cache = HttpRuntime.Cache;
            //IDictionaryEnumerator _cacheEnum = _cache.GetEnumerator();
            //ArrayList arrList = new ArrayList();
            //while (_cacheEnum.MoveNext()) 
            //{
            //    arrList.Add(_cacheEnum.Key);
            //}
            //foreach (string key in arrList)
            //{
            //    if (key.StartsWith("")) 
            //    {
            //        _cache.Remove(key);
            //    }
            //}

            //Cache.Insert("Date1",arrList, null, DateTime.Now.AddSeconds(20), TimeSpan.Zero,
            //         CacheItemPriority.Default,new CacheItemRemovedCallback(CacheItemRomovedCallback));



        


       

        }



       

       



        


       
    }
}
